package nl.hu.verbrandendephoenix.view;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class SearchUser {

	private HorizontalPanel pnlForm;
	private VerticalPanel pnlResult;
	private Label lblTitle;
	private TextBox txtSearch;
	private Button btnSearch;
	
	public SearchUser() {
		pnlForm = new HorizontalPanel();
		pnlResult = new VerticalPanel();
		
		lblTitle = new Label("Gebruiker zoeken:");
		lblTitle.addStyleName("h1");
		txtSearch = new TextBox();
		btnSearch = new Button("Zoek");
	}
	
	public Panel constructForm() {
		VerticalPanel pnlSearchUser = new VerticalPanel();
		
		VerticalPanel pnlFormContainer = new VerticalPanel();
		pnlFormContainer.add(lblTitle);
		pnlForm.add(txtSearch);
		pnlForm.add(btnSearch);
		pnlFormContainer.add(pnlForm);
		
		pnlSearchUser.add(pnlFormContainer);
		pnlSearchUser.add(pnlResult);
		
		return pnlSearchUser;
	}

	public TextBox getTxtSearch() {
		return txtSearch;
	}

	public Button getBtnSearch() {
		return btnSearch;
	}

	public VerticalPanel getPnlResult() {
		return pnlResult;
	}
}
